
package com.joysuch.wwyt.bp.bean;

import java.util.Date;

import cn.zlg.common.springmvc.validate.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

@Data
public class MhRiskBroadcastBean {

    @NotNull(field = "发布日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date date;
    // 生产装置状态
    @NotNull(field = "生产装置")
    private ProductionFacilityStats productionFacilityStats;
    @NotNull(field = "作业许可")
    private SafetyWorkCertStats safetyWorkCerts;
    @NotNull(field = "是否处于试生产")
    private int pilotProduction;
    @NotNull(field = "是否处于开停车状态")
    private int running;
    @NotNull(field = "是否处于安全状态")
    private int mhSafe;
    @NotNull(field = "安全状态文本")
    private String mhSafeText;
    @NotNull(field = "公告内容")
    private String promiseContent;
    @NotNull(field = "主要负责人")
    private String ceo;
    @NotNull(field = "公司")
    private String company;

    @Data
    public static class ProductionFacilityStats {
        private Item total = new Item();
        private Item running = new Item();
        private Item stopped = new Item();
        private Item reparing = new Item();
    }

    @Data
    public static class SafetyWorkCertStats {
        private Item fire0 = new Item();
        private Item fire1 = new Item();
        private Item fire2 = new Item();
        private Item resitrictedSpace = new Item();
        private Item high0 = new Item();
        private Item high1 = new Item();
        private Item high2 = new Item();
        private Item high3 = new Item();
        private Item lifting = new Item();
        private Item tempElectricity = new Item();
        private Item blindPlate = new Item();
        private Item breakGround = new Item();
        private Item breakRoad = new Item();
        private Item normal = new Item();
    }

    @Data
    public static class Item {
        public Item() {
        }

        public Item(int count, boolean selected) {
            super();
            this.count = count;
            this.selected = selected;
        }

        int count;
        boolean selected;

    }
}
